﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Text;

namespace ParseHtml
{
    /// <summary>
    /// 对获取的html代码进行安全处理
    /// </summary>
    public class HtmlSafeguard
    {
        public static string UrlEncode(string url)
        {
            return HttpUtility.UrlEncode(url);
        }
        public static string UrlDecode(string url)
        {
            return HttpUtility.UrlDecode(url);
        }
        public static string HtmlEncode(string html)
        {
            return HttpUtility.HtmlEncode(html);
        }
        public static string HtmlDecode(string html)
        {
            return HttpUtility.HtmlDecode(html);
        }
    }
}
